package com.example.enums;

import lombok.Getter;

/**
 * @Author 王鹤蒲
 * @Date 2023 08 01
 */
@Getter
public enum CodeEnum {

    SUCCESS(200,"处理成功"),
    NEED_LOGIN(401, "需要登录后操作"),
    NO_OPERATOR_AUTH(403, "无权限操作"),
    ES_ERROR(405, "Elasticsearch错误"),
    SYSTEM_ERROR(500, "系统出现错误"),
    CREATE_ERROR(501,"创建错误"),
    DELETE_ERROR(502,"删除错误"),
    MODIFY_ERROR(503,"更新错误"),
    QUERY_ERROR(504,"查询错误"),
    USERNAME_EXIST(505, "用户名已存在"),
    PHONENUMBER_EXIST(506, "手机号已存在"),
    EMAIL_EXIST(507, "邮箱已存在"),
    NO_USER_EXIST(508,"用户名或密码错误"),
    VALIDATE_ERROR(509,"参数校验错误"),
    EMAIL_NOT_EXIST(510,"与用户绑定邮箱不一致"),
    ORIGINAL_PASSWORD_ERROR(511,"原密码错误"),
    REQUEST_REPEAT_SUBMIT(512,"您操作太快啦，请稍后再试！"),
    DATA_PARSING_ERROR(513,"数据解析异常"),
    File_IMPORT_ERROR(514,"文件导入失败"),
    PARAMS_NOT_NULL(515,"参数不能为空"),
    TIMING_TASK_ERROR(516,"定时任务错误"),
    FILE_UPLOAD_ERROR(517,"文件上传失败"),
    FILE_DOWNLOAD_ERROR(518,"文件下载失败"),
    VERIFICATION_CODE_ERROR(601,"验证码异常"),
    USER_LOCKED(602,"该用户已被停用");


    private Integer code;
    private String msg;

    CodeEnum(int code, String msg) {
        this.code=code;
        this.msg=msg;
    }


}
